#include<stdio.h>
int main()
{
    int num = 0;
    scanf("%d",&num);
    int i = 0;
    int arr[1000]={0};
    for(i=0;i<num;i++)
    {
        scanf("%d",&arr[i]);
    }
    int count1 = 0;
    int count2 = 0;
    for(i=0;i<num;i++)
    {
        if(arr[i]%2==0)
        {
            count2++;
        }
        else
        {
            count1++;
        }
    }
    printf("%d %d",count1,count2);
    return 0;
}